<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script>
        function stop() {
            return false;
        }
        document.oncontextmenu = stop;
    </script>
    <script>
        var papertime;
        var startime;
        var arrstr = document.cookie.split("; ");
        for(var i = 0;i < arrstr.length;i ++)
        {
            var temp = arrstr[i].split("=");
            if (temp[0] == "papertime") {
                papertime = unescape(temp[1]);
            }
            if (temp[0] == "start") {
                startime = unescape(temp[1]);
            }
        }

        var mydate = new Date();
        var newdate = new Date(Date.parse(startime) + 1000 * 60 * papertime);
        var month = newdate.getMonth() + 1;
        var stringTime = newdate.getFullYear() + "/" + month + "/" + newdate.getDate() + " " + newdate.getHours() + ":" + newdate.getMinutes() + ":" + newdate.getSeconds();

        function daoji(stringTime)
        {
            var now = new Date();
            var end = new Date(stringTime);
            var nowTimeStamp = now.getTime();
            var endTimeStamp = end.getTime();
            var remainSecond= (endTimeStamp - nowTimeStamp) / 1000;
            var oneDay = 24*60*60;
            var oneHour = 60*60;
            var oneMinute = 60;
            var remainDays = parseInt((remainSecond / oneDay));
            var remainHours   = parseInt(((remainSecond - (remainDays*oneDay)) / oneHour));
            var Hours = parseInt((remainSecond / oneHour));
            var remainMinutes = parseInt((remainSecond - (Hours*oneHour)) / oneMinute);
            var Minutes = parseInt(remainSecond / oneMinute);
            var remainSeconds = parseInt(remainSecond - (Minutes * oneMinute));
            var endtime = remainHours + '小时'+ remainMinutes +'分钟'+ remainSeconds +'秒';
            var div1 = document.getElementById('sy');
            if (remainDays < 0 || remainHours < 0 || remainMinutes < 0 || remainSeconds < 0)
            {
                clearInterval(k);
                alert('您考试时间已到，请交卷！');
                endtime = '0小时0分钟0秒';
                window.parent.mainFrame.location.href = '/result';
                window.parent.leftFrame.location.href = '/leftresult';
                window.parent.bottomFrame.location.href = '/mainfram/botton.html';
                return;
            }
            else if (remainDays == 0 && remainHours == 0 && remainMinutes == 0 && remainSeconds == 0)
            {
                clearInterval(k);
                alert('您考试时间已到，请交卷！');
                endtime = '0小时0分钟0秒';
                window.parent.mainFrame.location.href = '/result';
                window.parent.leftFrame.location.href = '/leftresult';
                window.parent.bottomFrame.location.href = '/mainfram/botton.html';
                return;
            }
            div1.innerHTML = '';
            div1.innerHTML = endtime;

            var myfs, pagecount, fsarry, lastcount,yimark,yimarkcount,yiarry;
            var arrstr = document.cookie.split("; ");
            for (var i = 0; i < arrstr.length; i++) {
                var temp = arrstr[i].split("=");
                if (temp[0] == "report") {
                    myfs = unescape(temp[1]);
                }
                if (temp[0] == "papercount") {
                    pagecount = unescape(temp[1]);
                }
                if (temp[0] == "mark") {
                    yimark = unescape(temp[1]);
                }
            }
            fsarry = myfs.split('|');
            lastcount = pagecount - fsarry.length + 1;
            document.getElementById('wd').innerText =  lastcount;
            if (yimark!='') {
                yiarry = yimark.split('|');
                yimarkcount = yiarry.length - 1;
            }
            else {
                yimarkcount = 0;
            }
            document.getElementById('by').innerText =  yimarkcount;
        }
        var k =setInterval("daoji(stringTime)",1000);
    </script>
    <link rel="stylesheet" href="../stylesheets/left.css"/>
</head>
<body oncontextmenu="return false" style="font-family: 微软雅黑">

    <div style="width: 100%; height:2000px; position: absolute; top: 0px; background-color: #1c2b36;">
        <div style="height: 60px; line-height: 60px; text-align: center; color: #FFFFFF; font-size: 24px; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #141a1f;">
            国家医学考试系统
        </div>
        <div style="height:20px"></div>
        <div style="height: 80px; text-align: center; ">
            <img alt="" src="../images/02info/tx.png" style="height: 80px; width: 80px" /></div>
        <div style="height:20px"></div>
        <div style="line-height: 25px; text-indent: 10px;">
            <span style="color:#FFFFFF">考生：<%=username%></span>
        </div>
        <div style="height:15px"></div>
        <div style="line-height: 25px; text-indent: 10px;">
            <span style="color:#FFFFFF">准考证号：<%=admincard%></span>
        </div>
        <div style="height:20px; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #141a1f;"></div>
        <div style="line-height: 50px; height: 50px; text-indent: 10px; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #141a1f;">
            <img alt="" src="../images/02info/sjm.png"/>
            <span style="color:#FFFFFF"><%=papername%></span>
        </div>
        <div style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #141a1f; line-height: 50px; height: 50px; text-indent: 10px;">
            <img class="auto-style1" src="../images/02info/sj.png" />&nbsp;
            <span style="color:#FFFFFF">考试时间：</span>
            <span style="color:#FFFFFF"><%=papertime%></span>
            <span style="color:#FFFFFF"><%=endtime%></span>
        </div>
        <div style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #141a1f; line-height: 50px; text-indent: 10px; height: 50px;">
            <img class="auto-style1" src="../images/02info/sysj.png" />&nbsp;
            <span style="color:#FFFFFF">剩余时间：</span>
            <span style="color:#FFFFFF" id="sy"></span>
        </div>
        <div style="line-height: 50px; height: 50px; text-indent: 10px; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #141a1f;">
            <img class="auto-style2" src="../images/02info/wd.png" />&nbsp;
            <span style="color:#FFFFFF">未答题数：</span>
            <span style="color:#FFFFFF" id="wd"></span>
        </div>
        <div style="line-height: 50px; height: 50px; text-indent: 10px; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #141a1f;">
            <img class="auto-style1" src="../images/02info/by.png" />&nbsp;
            <span style="color:#FFFFFF">标疑题数：</span>
            <span style="color:#FFFFFF" id="by"></span>
        </div>
    </div>

</body>
</html>